Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods


ODContainer

Superclasses
ODRefCntObject --> ODObject
Subclasses
none

An object of the ODContainer class represents a physical container storing a collection of OpenDoc documents. The ODContainer class lets you access these documents independently of the container's physical characteristics or internal structure.

Description

The ODContainer class is implemented differently for different platforms and storage mechanisms.

The ODContainer class manipulates physical containers. Similarly, the ODDocument class (page 132) manipulates documents; the ODDraft class (page 147) manipulates drafts; and the ODStorageUnit class (page 664) manipulates storage units. This set of related classes, ODContainer, ODDocument, ODDraft, and ODStorageUnit is called a container suite. Container suite classes are implemented as an integrated set for each platform and storage mechanism because they work intimately with one another at many levels. The container suite used by default on the Mac OS platform is the Bento container suite.

Each container object can contain one or more document objects. Each document object, in turn, can contain one or more draft objects, and each draft object can contain one or more storage-unit objects. Each container, document, draft, and storage unit has with a unique ID.

Only the OpenDoc storage system directly creates container objects. The document shell or container application creates or accesses a container object by calling the storage-system object's CreateContainer (page 660) or AcquireContainer method (page 658). The storage system ensures that there is only one container object associated with each physical container.

You can access a document of a container by calling the container's AcquireDocument method (page 100). The ODContainer class is responsible for ensuring that there is only one document object associated with each document in the container.

For more information on how ODContainer and other container-suite classes are used, see the chapters on storage and OpenDoc runtime features in the OpenDoc Programmer's Guide for the MacOS.

Methods

This section presents summary descriptions of the ODContainer methods grouped according to purpose, followed by detailed descriptions in alphabetical order. Methods marked [D] are typically called by the document shell or container applications.

Object Retrieval

AcquireDocument [D]
Returns a reference to the document object associated with the specified document ID.
GetStorageSystem
Returns a reference to the storage-system object that created this container object.
Inquiry

GetID
Returns the container ID of this container object.
GetName
Returns the name of this container object.
Naming

SetName [D]
Sets the name of this container object.

Methods
AcquireDocument
GetID
GetName
GetStorageSystem
SetName

Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help